type op = Add | Sub | Mult | Div | Equal | Neq | Less | Leq | Greater | Geq

type shape = Rect | Ellipse | Line | Undef

type expr =
    Literal of int
  | String of string
  | Rectangle of string
  | Ellipse of string
  | Line of string
  | Shape of string
  | Id of string
  | Binop of expr * op * expr
  | Assign of string * expr
  | Call of string * expr list
  | Moveto of string * expr * expr
  | Moveby of string * expr * expr
  | Noexpr
  | GetV1 of string
  | GetV2 of string
  | GetV3 of string
  | GetV4 of string
  | Aid of string * expr
  | AAssign of string * expr * expr
  | REvaluation of expr * expr * expr * expr
  | EEvaluation of expr * expr * expr * expr
  | LEvaluation of expr * expr * expr * expr

type stmt =
    Block of stmt list
  | Expr of expr
  | Return of expr
  | If of expr * stmt * stmt
  | For of expr * expr * expr * stmt
  | While of expr * stmt

type vari_decl = {
    vtype : string;
	vsize : int;
    name : string;
  }

type vari_value = {
    ltype : string;
    value : string;
  }

type func_decl = {
    fname : string;
    formals : (vari_decl) list;
    locals : (vari_decl) list;
    body : stmt list;
  }

type program = (vari_decl) list * func_decl list
